﻿using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Unity;

namespace MaxStoreShop.WcfUnity
{
    public abstract class UnityServiceBase
    {
        protected UnityServiceBase()
        {
            ConfigureUnity();
        }

        private static void ConfigureUnity()
        {
            // Configure common service locator to use Unity
            ServiceLocator.SetLocatorProvider(() => new UnityServiceLocator(DiWrapper.Container));

            // Register the repository
            //DiWrapper.Container.RegisterType<IProductRepository, ProductRepository>();
        }
    }
}
